package com.football.springboot.mapper;

import com.football.springboot.entity.Player;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.football.springboot.entity.PlayerAbility;
import com.football.springboot.entity.Team;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 李越
 * @since 2023-02-24
 */
public interface PlayerMapper extends BaseMapper<Player> {

    //查找球员所属球队信息
    Team getTeaminfoByplayer(int id);

    //查找所有球员信息(包含team)
    List<Player> listAllByIdPlayer();

    //查看球员能力值
    PlayerAbility getPlayerAbility(int playerId);

    //根据球队id查找球员信息
    List<Player> getPlayerByTeamId(@Param("team_id") Integer teamId);
}
